package eteam.aps.systeminterface.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.GroupSequence;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @description : sp_customerDto
 */
@Data
@ApiModel(value = "sp_customer")
@GroupSequence({Insert.class, Update.class, CustomerDto.class})
public class CustomerDto implements Serializable {
    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    @NotBlank(message = "客户ID为空", groups = Update.class)
    public String fcustid;
    /**
     * 类别ID
     */
    @ApiModelProperty("类别ID")
    @NotBlank(message = "分类ID为空", groups = {Insert.class, Update.class})
    public String fclassid;
    /**
     * 编号
     */
    @ApiModelProperty("编号")
    @NotBlank(message = "编号为空", groups = Update.class)
    public String fcode;
    /**
     * 名称
     */
    @ApiModelProperty("名称")
    @NotBlank(message = "名称为空", groups = {Insert.class, Update.class})
    public String fname;
    /**
     * 排序
     */
    @ApiModelProperty("排序")
    @NotNull(message = "排序不合法", groups = {Insert.class, Update.class})
    public Integer forder;
    /**
     * 联系人
     */
    @ApiModelProperty("联系人")
    @NotBlank(message = "联系人为空", groups = {Insert.class, Update.class})
    public String fcontacts;
    /**
     * 联系电话
     */
    @ApiModelProperty("联系电话")
    @NotBlank(message = "联系电话为空", groups = {Insert.class, Update.class})
    public String fcontacttel;
    /**
     * 邮箱
     */
    @ApiModelProperty("邮箱")
    public String femail;
    /**
     * 备注
     */
    @ApiModelProperty("备注")
    public String fremark;
    /**
     * 简称
     */
    @ApiModelProperty("简称")
    public String fshortname;
    /**
     * 助记码
     */
    @ApiModelProperty("助记码")
    public String fzjcode;
    /**
     * 别名
     */
    @ApiModelProperty("别名")
    public String fnickname;
    /**
     * 描述
     */
    @ApiModelProperty("描述")
    public String fdesc;
    /**
     * 工商注册编号
     */
    @ApiModelProperty("工商注册编号")
    public String ftradeno;
    /**
     * 营业执照
     */
    @ApiModelProperty("营业执照")
    public String fidcard;
    /**
     * 法人代表
     */
    @ApiModelProperty("法人代表")
    public String fmanager;
    /**
     * 行业
     */
    @ApiModelProperty("行业")
    public String ftrade;
    /**
     * 地址
     */
    @ApiModelProperty("地址")
    public String faddress;
    /**
     * 状态【-1删除 0停用 1启用】
     */
    @ApiModelProperty("状态【-1删除 0停用 1启用】")
    @NotNull(message = "状态不合法", groups = {Insert.class, Update.class})
    @Max(value = 1, message = "状态不合法", groups = {Insert.class, Update.class})
    @Min(value = -1, message = "状态不合法", groups = {Insert.class, Update.class})
    public Integer state;
    /**
     * 手机
     */
    @ApiModelProperty("手机号码")
    @NotBlank(message = "手机号码为空", groups = {Insert.class, Update.class})
    private String fmobile;
}
